package com.yihuier.yihuier.Mapper.UserManager;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.hibernate.validator.constraints.URL;

import java.util.List;
import java.util.Map;

@Mapper
public interface QuestionMapper {

    @Select("SELECT question_content from bz_question where question_id = #{question_id};")
    String selectquestion(@Param("question_id") int question_id);

    @Select("SELECT user_name from bz_question where user_id = #{user_id};")
    String selectUserNameByUserId(@Param("user_id") String user_id);

    @Select("SELECT question_id,question_content from bz_question;")
    List<Map<String,String>> selectQuestions();
}
